﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using VacationDaysCommons;
using VacationDaysDatabase;

namespace VacationDays
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together.
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple)]
    public class VDMessengerService : IVDMessengerService
    {
        public bool SendUserMessage(VDMessageItem newMessage)
        {
            bool result = DataAccess.Instance.SendUserMessage(newMessage);
            return result;
        }

        public List<VDMessageItem> GetUserMessages(Guid userId)
        {
            var userMessages = DataAccess.Instance.GetUserMessages(userId);
            return userMessages;
        }
    }
}
